package br.com.ArquivoPadrao.pojo;

import br.com.ArquivoPadrao.exception.PojoException;

public class BasePojoFactory {
   
    private static PojoFactory pojoFactory;

    public static PojoFactory getPojoFactory() throws PojoException {
        if (pojoFactory != null){
            return pojoFactory;
        } else{
            throw new PojoException("PojoFactory não foi inicializada!");
        }
    }

    public static synchronized void setPojoFactory(PojoFactory pojoFactory) {
        BasePojoFactory.pojoFactory = pojoFactory;
    }

}

